<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>旅行</title>  
    <link rel="stylesheet" href="../libs/mui/mui.css" />
	<link rel="stylesheet" href="../libs/iconfont/fonts/iconfont.css"/>
	<link rel="stylesheet" type="text/css" href="../css/main.css"/>
	<link rel="stylesheet" type="text/css" href="../css/login.css"/>	
	<style>
		.mui-card{margin-bottom: 5px;}
		.mui-card-media{height: 120px;position: relative;}
		.mui-card-media img{height: 120px;}
		.mui-card-media b{position: absolute;top: 40%;color: white;z-index: 999;font-size: 20px;width: 100%;text-align: center;}			
	</style>
</head>
<body>	
	<header class="mui-bar mui-bar-nav">
		<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		<h1 class="mui-title"></h1>		
	</header>
	<div class="mui-content">
		<div class="mui-card">
			<div class="mui-card-header mui-card-media">
				<img src="../public/img/16.jpg"/>
				<b>门票</b>
				<div style="background: rgba(0,0,0,0.2);width: 100%;height: 120px;position: absolute;top: 0;"></div>
			</div>
		</div>
		<div class="mui-card">
			<div class="mui-card-header mui-card-media">
				<img src="../public/img/17.jpg"/>
				<b>一日游</b>
				<div style="background: rgba(0,0,0,0.2);width: 100%;height: 120px;position: absolute;top: 0;"></div>
			</div>
		</div>
		<div class="mui-card">
			<div class="mui-card-header mui-card-media">
				<img src="../public/img/18.jpg"/>
				<b>周末游</b>
				<div style="background: rgba(0,0,0,0.2);width: 100%;height: 120px;position: absolute;top: 0;"></div>
			</div>
		</div>
		<div class="mui-card">
			<div class="mui-card-header mui-card-media">
				<img src="../public/img/lun3.jpg"/>
				<b>暑假游</b>
				<div style="background: rgba(0,0,0,0.2);width: 100%;height: 120px;position: absolute;top: 0;"></div>
			</div>
		</div>
	</div>
</body>
<script type="text/javascript" src="../js/mui.min.js"></script>
<script type="text/javascript" src="../libs/jquery/jquery.js"></script>
<script type="text/javascript" src="../js/web_js/public.js"></script>
<script type="text/javascript" src="../js/function.js"></script>
<script type="text/javascript" src="../js/open.js"></script>
<script>
//	//产品信息
//	$(".mui-card").on('tap',function(){
//		openNewPage('Travel_weekend.html');
//	})
	
</script>
<script type="text/javascript">
	var member_id = '';
	document.addEventListener('plusready',function(){
		member_id = plus.storage.getItem('id');
		store_id = plus.storage.getItem('store_id');
		var ws = plus.webview.currentWebview();
		var cart_id = ws.cart_id;
		var cart_name = ws.cart_name;
		$('.mui-title').text(cart_name);
//		console.log(apiRoot+"?act=index&op=mobile&cart_id="+cart_id); 
		$.ajax({   
			type:"post", 
			url:apiRoot+"?act=index&op=mobile",
			data:{cart_id:cart_id,store_id:store_id},
//			dataType:'json',
			success:function(data){
				var info = $.parseJSON(data);
				console.log(JSON.stringify(info)); 
				if(info.length > 0){ 
//					plus.storage.setItem('data',data);
					$.each(info, function(k,v) {
						$('.mui-card').eq(k).attr('data-id',v.gc_id);
					}); 
				} 
				//详情 
				$('.mui-card').unbind('click');
				$('.mui-card').on('click',function(){
					var _this = $(this);
					var goodsid = _this.attr('data-id');
//					console.log(goodsid);
					var nwaiting = plus.nativeUI.showWaiting();//显示原生等待框
					var webviewContent= plus.webview.create('./Travel_weekend.html','Travel_weekend.html',{},{goodsid:goodsid,data:data});//后台创建webview并打开show.html
					webviewContent.addEventListener("loaded", function() { //注册新webview的载入完成事件
				        nwaiting.close(); //新webview的载入完毕后关闭等待框
				        webviewContent.show("slide-in-right",20); //把新webview窗体显示出来，显示动画效果为速度200毫秒的右侧移入动画
				    }, false);
				})
			},
			error:function(e){
				toast('加载失败！');
			}
		})
	})
</script>
</html>